<template>
  <div>
    <el-card>
      <div class="box">
        <img class="avatar" :src="userStore.userInfo.avatar" alt="">
        <div>
          <div class="title">{{ getTime() }}好 {{ userStore.userInfo.username }}</div>
          <div class="desc">欢迎来到{{ setting.title }}</div>
        </div>
      </div>
    </el-card>
    <div class="footer">
      <SvgIcon name="welcome" width="500px" height="500px"></SvgIcon>
    </div>
  </div>
</template>

<script setup lang="ts">
import useUserStore from "@/store/modules/user.ts";
import {getTime} from "@/utils/time.ts";
import setting from "@/setting.ts";
import SvgIcon from "@/components/SvgIcon/index.vue";

let userStore = useUserStore()
</script>

<style scoped lang="scss">
.box {
  display: flex;
  align-items: center;
  flex-direction: row;
  gap: 20px;

  .avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
  }

  .title {
    font-size: 25px;
    font-weight: bold;
    margin-bottom: 30px;
  }

  .desc {
    font-style: italic;
  }
}

.footer {
  display: flex;
  align-items: center;
  justify-content: center;
}
</style>
